<template>
<!-- 用户列表 -->
    <div>
        <!-- 面包屑 -->
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item >>用户管理</el-breadcrumb-item>
            <el-breadcrumb-item >用户列表</el-breadcrumb-item>
        </el-breadcrumb>
        <!-- 卡片  -->
        <el-card class="box-card">
           <div style="margin-top: 15px;">
               <el-row :gutter="20">
                <el-col :span="7">
                    <el-input placeholder="请输入内容">
                        <el-button slot="append" icon="el-icon-search"></el-button>
                    </el-input>
                </el-col>
                <el-col :span="4">
                    <el-button type="primary">添加用户</el-button>
                </el-col>
                </el-row>

            </div>
        </el-card>
        <el-table
        :data="tableData"
        stripe
        style="width: 100%"
        border
        show-header
        >
        <!-- 第一个是索引项 -->
             <el-table-column type='index' label="序号" class="topstyle" >
            </el-table-column>
            <el-table-column
            prop="date"
            label="日期"
            width="180">
            </el-table-column>
            <el-table-column
            prop="name"
            label="姓名"
            width="180">
            </el-table-column>
            <el-table-column
            prop="address"
            label="地址">
            </el-table-column>
            <el-table-column prop="isOn" label="状态">
                <!-- <template slot-scope='isOn'>

                </template> -->
            </el-table-column>
         </el-table>
         <!-- 分页 -->
         <el-pagination
            background
            layout="prev, pager, next"
            :total="datalength">
            </el-pagination>
    </div>
</template>
<script>

export default ({
  data () {
    return {
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄',
        isOn: true
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄',
        isOn: false
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄',
        isOn: false
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄',
        isOn: false
      }],
      datalength: 100
    }
  }
})
</script>
<style scoped>
.el-breadcrumb{
    margin-bottom:30px ;
}
.topstyle{
    width:100px !important;
}
.el-pagination{
    margin-top: 30px;
}
</style>
